package com.hl.sfzy.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 课程交流表
 * @TableName course_talk
 */
public class CourseTalk {
    /**
     * 编号
     */
    private Integer courseTalkId;

    /**
     * 标题
     */
    private String courseTalkTitle;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date courseTalkCreateTime;

    /**
     * 课程编号
     */
    private Integer courseId;

    /**
     * 用户编号
     */
    private Integer userId;

    /**
     * 编号
     */
    public Integer getCourseTalkId() {
        return courseTalkId;
    }

    /**
     * 编号
     */
    public void setCourseTalkId(Integer courseTalkId) {
        this.courseTalkId = courseTalkId;
    }

    /**
     * 标题
     */
    public String getCourseTalkTitle() {
        return courseTalkTitle;
    }

    /**
     * 标题
     */
    public void setCourseTalkTitle(String courseTalkTitle) {
        this.courseTalkTitle = courseTalkTitle;
    }

    /**
     * 创建时间
     */
    public Date getCourseTalkCreateTime() {
        return courseTalkCreateTime;
    }

    /**
     * 创建时间
     */
    public void setCourseTalkCreateTime(Date courseTalkCreateTime) {
        this.courseTalkCreateTime = courseTalkCreateTime;
    }

    /**
     * 课程编号
     */
    public Integer getCourseId() {
        return courseId;
    }

    /**
     * 课程编号
     */
    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    /**
     * 用户编号
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 用户编号
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CourseTalk other = (CourseTalk) that;
        return (this.getCourseTalkId() == null ? other.getCourseTalkId() == null : this.getCourseTalkId().equals(other.getCourseTalkId()))
            && (this.getCourseTalkTitle() == null ? other.getCourseTalkTitle() == null : this.getCourseTalkTitle().equals(other.getCourseTalkTitle()))
            && (this.getCourseTalkCreateTime() == null ? other.getCourseTalkCreateTime() == null : this.getCourseTalkCreateTime().equals(other.getCourseTalkCreateTime()))
            && (this.getCourseId() == null ? other.getCourseId() == null : this.getCourseId().equals(other.getCourseId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCourseTalkId() == null) ? 0 : getCourseTalkId().hashCode());
        result = prime * result + ((getCourseTalkTitle() == null) ? 0 : getCourseTalkTitle().hashCode());
        result = prime * result + ((getCourseTalkCreateTime() == null) ? 0 : getCourseTalkCreateTime().hashCode());
        result = prime * result + ((getCourseId() == null) ? 0 : getCourseId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", courseTalkId=").append(courseTalkId);
        sb.append(", courseTalkTitle=").append(courseTalkTitle);
        sb.append(", courseTalkCreateTime=").append(courseTalkCreateTime);
        sb.append(", courseId=").append(courseId);
        sb.append(", userId=").append(userId);
        sb.append("]");
        return sb.toString();
    }
}